package com.shop.service;

import java.util.List;

import com.shop.bean.Credit;

/** 
 * @className: ICreditService.java
 * @classDescription: 
 * @function: 
 * @author: Victor
 * @createTime: 2012-11-1 下午07:13:17
 * @modifyTime: 
 * @modifyReason: 
 * @since: JDK 1.6
 */
public interface ICreditService {
	/**
	 * 新建积分
	 * 
	 * @param credit
	 * @throws Exception
	 */
	public int createCredit(Credit credit) throws Exception;

	/**
	 * 更新积分
	 * 
	 * @param credit
	 * @throws Exception
	 */
	public int updateCredit(Credit credit) throws Exception;

	/**
	 * 根据Id删除积分
	 * 
	 * @param creditId
	 * @throws Exception
	 */
	public int deleteCreditById(long creditId) throws Exception;

	/**
	 * 根据Id查询积分
	 * 
	 * @param creditId
	 * @return
	 * @throws Exception
	 */
	public Credit queryCreditById(long creditId) throws Exception;

	/**
	 * 查询所有的用户积分
	 * 
	 * @return
	 * @throws Exception
	 */
	public List<Credit> queryAllCredit() throws Exception;
	
	/**
	 * 分页查询所有用户的积分
	 * @param pageSize
	 * @param pageNow
	 * @return
	 * @throws Exception
	 */
	public List<Credit> queryAllCredit(int startPage,int pageSize) throws Exception;
}
